<?php
	//$callback = "popupResult";
	
	$callback = Yii::app()->request->getParam("callback","");
	echo "CALLBACK : ". Yii::app()->request->getParam("callback","");
?>
<script>
	var callbackFunct;
	function returnResult(obj){
		//alert ("return result");
		
		//eval("window.opener.popupResult('test 123')";
		window.opener["<?php echo $callback ?>"](obj);
		//window.opener["popupResult"]("1234567");
		window.close();
		
	}
	function returnResultObject(){
		var obj = {id:"05",name:"Suhendra pramana"};
		window.opener["<?php echo $callback ?>"](obj);
		window.close();		
	}
	
</script>
<button onClick="returnResult(1234567890)">Test</button></br>
<button onClick="returnResult(1111111111)">Test1</button></br>
<button onClick="returnResult(2222222222)">Test2</button></br>
<button onClick="returnResult(3333333333)">Test3</button></br>
<button onClick="returnResultObject()">Test Obj</button></br>
